import { defineStore } from "pinia"

export const useInputStore = defineStore("input", {
  state: () => ({
    inputToSearch: false, // 搜索框
    inputToSearch2: true // 搜索按钮
  }),
  actions: {
    inputToSearchToTrue() {
      this.inputToSearch = true
    },

    inputToSearchToFalse() {
      this.inputToSearch = false
    },

    inputToSearch2ToTrue() {
      setTimeout(() => {
        this.inputToSearch2 = true
      }, 860)
    },

    inputToSearch2ToFalse() {
      this.inputToSearch2 = false
    }
  }
})